#ifndef _GEOMETRY_H_
#define _GEOMETRY_H_

#include<vector>
using namespace std;

struct tagPoint2D
{
	double x, y;
};
typedef struct tagPoint2D Point2D;
typedef struct tagPoint2D Vector2D;

struct tagPoint3D
{
	double x, y, z;
};
typedef struct tagPoint3D Point3D;
typedef struct tagPoint3D Vector3D;

struct tagTriangle2D
{
	Point2D *p1;
	Point2D *p2;
	Point2D *p3;
};
typedef struct tagTriangle2D Triangle2D;

struct tagTriangle3D
{
	Point3D *p1;
	Point3D *p2;
	Point3D *p3;
};
typedef struct tagTriangle3D Triangle3D;

char counterClockwise(const Point2D *p1, const Point2D *p2, const Point2D *p3);
double left(vector<Point2D*>);
double top(vector<Point2D*>);
double right(vector<Point2D*>);
double bottom(vector<Point2D*>);
Point2D* intersection2D(Point2D A, Point2D B, Point2D C, Point2D D);

#endif